package com.sghy.xcxservice.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sghy.xcxservice.entity.BgbLoginUser;
import com.sghy.xcxservice.service.BgbLoginUserService;
import com.sghy.xcxservice.mapper.BgbLoginUserMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author pc
* @description 针对表【bgb_login_user(用户账户登录信息表)】的数据库操作Service实现
* @createDate 2025-05-29 18:10:16
*/
@Service
public class BgbLoginUserServiceImpl extends ServiceImpl<BgbLoginUserMapper, BgbLoginUser>
    implements BgbLoginUserService{
    /**
     * 获取正常状态的登录列表
     * @param id
     * @return
     */
    @Override
    public List<BgbLoginUser> getLoginUserListByLoginIdOrderTime(Integer id) {
        QueryWrapper<BgbLoginUser> wrapper = new QueryWrapper<>();
        wrapper.eq("login_id",id);
        wrapper.orderByDesc("last_time");
        return getBaseMapper().selectList(wrapper);
    }
}




